package com.diapoclic.servlet;

import java.io.IOException;

import javax.ejb.EJB;
//import javax.naming.*;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.diapoclic.entity.Personne;
import com.diapoclic.session.UserManagerRemote;


/**
 * Servlet implementation class DiapoClicWebControler
 */
public class DiapoClicWebControler extends HttpServlet {
	private static final long serialVersionUID = 1L;

	@EJB 
	UserManagerRemote beanRemote ;	
	
    /**
     * Default constructor. 
     */
    public DiapoClicWebControler() {
        // TODO Auto-generated constructor stub
    	
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		
		
		Personne Bob = new Personne();
		Bob.setId(5);
		Bob.setNom("Bob");
		Bob.setPrenom("Boby");
		Bob.setMail("bob@lads.com");
		
		beanRemote.Bonjour("Client");
		beanRemote.AjouterPersonne(Bob);
		beanRemote.Bonjour("Client");
		
		
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
	}

}
